package com.flying.admin.service;

import com.flying.common.annotation.DaoCreate;
import com.flying.common.annotation.DaoQuery;
import com.flying.common.annotation.DaoRemove;
import com.flying.common.annotation.DaoUpdate;
import com.flying.framework.annotation.MethodInfo;
import com.flying.framework.annotation.Param;
import com.flying.framework.annotation.Service;
import com.flying.framework.data.Data;
import com.flying.framework.service.AbstractService;

@Service(value="ServiceEventDetail", desc="事件详情")
public class ServiceEventDetail extends AbstractService{
	public final static String TABLE_NAME = "sys_service_event_detail";
	
	public enum Field {
		
		event_id       ("event_id",          "int",	"日志ID"),
		input          ("input",             "String",	"输入"),
		output         ("output",            "String",	"输出"),
		error          ("error",             "String",	"错误");
		
		public final String fieldName;
		public final String fieldType;
		public final String fieldComment;
	
		Field(String name, String dataType, String comment) {
			this.fieldName 		= name;
			this.fieldType		= dataType;
			this.fieldComment	= comment;
		}
	}
        
	@MethodInfo("创建事件详情")
	@DaoCreate(entity="sys_service_event_detail")
	public Data create(
		
			@Param(value="event_id",          required=true,	desc="日志ID") long event_id,
			@Param(value="input",             required=false,	desc="输入") String input,
			@Param(value="output",            required=false,	desc="输出") String output,
			@Param(value="error",             required=false,	desc="错误") String error
		
		) throws Exception {
		
		return null;
	}

	@MethodInfo("修改事件详情")
	@DaoUpdate(entity="sys_service_event_detail")
	public Data update(
		
			@Param(value="event_id",          required=false,	desc="日志ID") long event_id,
			@Param(value="input",             required=false,	desc="输入") String input,
			@Param(value="output",            required=false,	desc="输出") String output,
			@Param(value="error",             required=false,	desc="错误") String error,
			@Param(value="fields", required=false, desc="更新字段", tag="fields") String[] fields
			
		) throws Exception {
		
		return null;
	}

	@MethodInfo("删除事件详情")
	@DaoRemove(entity="sys_service_event_detail")
	public Data remove(
		
			@Param(value="event_id",          required=true,	desc="日志ID") long event_id
		
		) throws Exception {
		
		return null;
	}

	@MethodInfo("查询所有事件详情")
	@DaoQuery(entity="sys_service_event_detail")
	public Data findAll() throws Exception {
		return null;
	}

	@MethodInfo("根据主键查询事件详情")
	@DaoQuery(entity="sys_service_event_detail", single=true)
	public Data findById(
		
			@Param(value="event_id",          required=true,	desc="日志ID") long event_id
		
		) throws Exception {
		return null;
	}

}